package com.hanamaki.oop.demo09.extends_car;

public class Bus implements Vehicle {



    String carType;

    Integer seat;

    Double dayRentMoney;

    /**
     * 重写父类的租赁价方法；
     * @param carType
     * @param seat
     * @param day
     * @return
     */
    @Override
    public Double renPrice(String carType, int seat, int day) {

        if (seat <= 16) {
            this.dayRentMoney = Double.valueOf(800);
        } else if (seat > 16) {
            this.dayRentMoney = Double.valueOf(1500);
        }

        return this.dayRentMoney * day;
    }
}
